package ua.ck.example.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ua.ck.example.dao.ProviderDAO;
import ua.ck.example.domain.Provider;

@Service("providerService")
public class ProviderServiceImpl implements ProviderService {

	@Autowired
	private ProviderDAO providerDAO;

	@Override
	@Transactional
	public void addProvider(Provider provider) {
		providerDAO.addProvider(provider);
	}

	@Override
	@Transactional
	public Provider getProvider(Provider provider) {
		return providerDAO.getProvider(provider);
	}
}
